package org.yi.web.security.entity;

import org.yi.core.annotation.TableBind;

import com.jfinal.plugin.activerecord.Model;

@SuppressWarnings("serial")
@TableBind(name="f_role")
public class RoleEntity extends Model<RoleEntity>{
	
	private static final String TABLE_NAME = "f_role";
	
	public static RoleEntity dao = new RoleEntity();
	
	public RoleEntity getRoleByName(String roleName) {
		return dao.findFirst("select * from " + TABLE_NAME + " where name = ?", roleName);
	}
	
}
